home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
editor
/
textvw14.lzh
/
TextView
/
TextView.doc
< prev
next >
Wrap
Text File
|
1996-02-08
|
20KB
|
604 lines
$VER: TextView.doc 1.4 (8.2.96)
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
Februari 8, 1996
Torbjörn Andersson
presents
TextView 1.4
Shareware
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
1. Contents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contents ................................................. 1
Introduction ............................................. 2
Requirements ............................................. 3
Usage .................................................... 4
Load ..................................................... 5
Save ..................................................... 6
Crunch ................................................... 7
Search ................................................... 8
Settings ................................................. 9
Comments ................................................ 10
History ................................................. 11
Credits ................................................. 12
Distribution ............................................ 13
2. Introduction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TextView is one of the programs I use most. I made it
because I wanted a good and fast textviewer. And TextView
is fast. It loads files in a twinkling of an eye, it has
custom routines for text output and scrolling, and searching
for a string is very fast. I have tried to make it
configurable and userfriendly, so I hope it can be used by
anybody.
Features:
· Written entirely in assembler.
· Has custom routines for text output and scrolling.
· Scrollbar with soft realtime scrolling.
· Handles both LF and CR+LF as EOL.
· Can show different fontstyles and colors.
· Doesn't show commands in AmigaGuide files.
· Files can be shown in binary and hexadecimal form.
· Reads files crunched with PowerPacker.
· Can crunch and save files.
· Can be made Resident.
· NewLook menus under AmigaOS 3.0+.
· Font sensitive.
· Random palettes.
· Window on own screen or any public screen.
· Configure font, screen depth, placement of scrollbar, etc.
· Very fast searchroutine.
· Up to ten bookmarks.
· AmigaOS 1.2/1.3 compatible.
3. Requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reqtools.library is required if you want to:
Choose file (loading and saving), choose font, choose screen
mode, search for a string, set tab size, set priority, change
palette.
Alternatively asl.library can be used for the file-, font-
and screen mode selecting.
Powerpacker.library is required if you want to:
View a file that is both crunched and encrypted with
PowerPacker, or crunch and save a file.
Asl.library is a part of AmigaOS 2.0+. Reqtools.library and
powerpacker.library are popular libraries by Nico François.
You should not have any big trouble finding these if you
don't already have them.
4. Usage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TextView can be started from both CLI and Workbench, and can
be made resident. It doesn't take any arguments from
Workbench, except the file if you use TextView as default
tool. From CLI the usage is:
TextView [file|dir] [TABS <n>] [BIN|HEX]
You can use the arrow keys to view lines that are too long,
or use Word Wrap by pressing W. TextView will then format
the text by putting line feeds where appropriate. Word Wrap
cannot be undone.
Use shift and an F-key to set a bookmark the same F-key to
go to that bookmark. Use B/H keys to toggle between
bin/hex/normal view mode. Press Help to see key commands
and some other information.
5. Load
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you start TextView with no arguments, it will open a file
requester. You can specify a filename on the commandline to
load directly, or a directory to position the file requester
in. If you want to load a new file, use Open in the Project
menu.
TextView will load the whole file in one turn. It has some
disadvantages. It requires that there is a free continuous
block of memory as large as the file. The loading cannot be
interrupted. You can't start reading until the whole file
is loaded. But it is fast.
If the file was crunched with PowerPacker it will
automatically be decrunched before it is shown. If it is
encrypted you will be asked for a password first.
When the file is loaded, TextView will count the number of
lines in it, and at the same time create a small speed up
table used when scrolling through the file.
6. Save
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sometimes I load a huge file of a floppy with TextView, and
then discover that I want a copy of it on the HD. Since the
file is in memory, it would be a waste of time to have to
access the slow floppy once again. I think it is natural to
have a save function in a textviewer, even if it is not
possible to edit the text.
Use Save As in the Project menu to save the current file.
It is easy to select Save As instead of Open in a hurry, but
TextView will of course warn you if a file with the selected
name already exists.
7. Crunch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the Project menu there are three labels handling
crunching.
Project->Crunch crunches the file currently in view. You
can't use this function to encrypt or crunch executable
files, it only handles "data" files. The efficiency used is
always "best". Speedup buffer is automatically adjusted to
available memory. One or two "*" will be shown in the
titlebar while crunching if the largest buffer couldn't be
allocated; and crunching is then slower. You can abort
crunching at any time by selecting crunch again.
Project->Save PP saves the file crunched. It will
automatically crunch it, if you haven't done it. If this
function crunches the file itself, it will not keep the
crunched part if saving is successful.
Project->Flush PP frees the memory eventually holding the
crunched file. Press the help key or choose Project->About
to see if the file have been crunched. Crun shows the size
of the file crunched (excluding the ID-header) and Gain
shows how much smaller the crunched file is.
8. Search
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you want to search for a string there is a Search menu,
it is easier to just press F or S. Use shift if you want to
search for a string case-sensitive. When you have entered
the string in the string gadget, the title bar will read
"Searching...". If the whole file is scanned and the string
couldn't be found, the titlebar will read "Not Found". If
the string was found, it will be highlighted in the middle
of the window.
Press N to search for the next occurence of the string, or P
to search for the previous one.
The search function will never move the text to a different
horizontal position.
If you search for a string in an AmigaGuide file with the
Guide flag set, some occurences might not be highlighted.
If you search for a string in bin/hex mode, it will be shown
at the top of the window, and it will not be highlighted.
9. Settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The settings menu lets you configure TextView.
Asl
~~~
If this is selected TextView will use asl.library for the
file-, font- and screen mode requesters instead of
reqtools.library.
ANSI
~~~~
Tells TextView to show different colors and font styles in
some files. This will make text output slower, especially
if different colors forces TextView to use more than only
the first bitplane.
Guide
~~~~~
TextView will not show commands in AmigaGuide files, which
makes them much more readable. Text ouput may be slower,
but leave this flag on. It is automatically switched off
internally when viewing other files.
Screen Close Gadget
~~~~~~~~~~~~~~~~~~~
It is not possible to have a closegadget directly on a
screen. Therefore some programs don't have any closegadget
when using a screen, or they solve it in different,
sometimes stupid, ways.
If this flag is selected, TextView will open an extra window
on the screen with only a closegadget. The size of the
closegadget isn't known in advance, so the window will have
the size 1x1 when opened. Then TextView finds out the size
of the closegadget and resizes the window according to it.
This is the best solution I can think of right now. A
problem might be that for the titlebar string to be shown
altogether, some extra spaces must be put in the beginning
of it. If there is any problem or you don't like this, you
can turn this option off.
Make Screen Public
~~~~~~~~~~~~~~~~~~
If TextView is using its own custom screen, it will be made
public when running under AmigaOS 2.0+. Other applications
can then open their windows on TextView's screen in a manner
supported by the OS. The name of the screen is
TextViewScreenN, where N is a number from 1 and upwards,
depending on the number of screens that are opened by
TextView.
Use Custom Routines
~~~~~~~~~~~~~~~~~~~
If this flag is selected, TextView will use its own custom
routines for text output and scrolling. One routine is used
for any 8x8 size font, and writes the characters directly on
the screen. Another uses the blitter to clear areas on the
screen. A third uses the CPU for scrolling, but only on
68020 or better.
If this flag isn't selected, there is one special routine
that might be used anyway. It is used for any 8x8 size font
and uses BltTemplate(), like some patches for the
Text-function.
This flag cannot be selected if TextView isn't using its own
custom screen, or if it is made public.
Select Tab Size
~~~~~~~~~~~~~~~
Opens a requester and lets you set the tab size.
Screen->Use Public Screen
~~~~~~~~~~~~~~~~~~~~~~~~~
If TextView is running under AmigaOS 1.2/1.3 it will open
its window on the Workbench screen. If running under
AmigaOS 2.0+ it will first open it the default public
screen, which often is the Workbench screen. If TextView
already has its window on any public screen, it will close
it and open it on the next available public screen.
Screen->Duplicate Workbench
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use a screen with the same size and mode as the Workbench
screen.
Screen->Select Type
~~~~~~~~~~~~~~~~~~~
Lets you select screen mode and size from a requester.
Screen->Hires/Hires-Interlace
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Open screen in hires/hires-interlace mode, and with the same
size as the Workbench screen. Mostly intended for kickstart
1.2/1.3 users, because the screen mode requester is only
available under 2.0+.
Depth->1/2/3
~~~~~~~~~~~~
Specifies screen depth. Only one color can be used for the
text if you select depth 1, but it saves chip memory.
Colors->Random
~~~~~~~~~~~~~~
Each time TextView is started, it will randomly use one of
the predefined palettes in the submenu.
Colors->Default
~~~~~~~~~~~~~~~
Use the same colors as the Workbench screen.
Colors->Adjust
~~~~~~~~~~~~~~
Opens a requester and lets you adjust the screen colors.
Colors->Tint/Paraoh...
~~~~~~~~~~~~~~~~~~~~~~
These are the same palettes as in the 3.0 palette preference
program. Am I creative or what? :)
Font
~~~~
The font menu specifies the font that will be used for text
output, and it can only be monospace.
Font->Default
~~~~~~~~~~~~~
Use GfxBase->DefaultFont. It is the "System Default Text"-
choice in the font preferences program.
Font->Select
~~~~~~~~~~~~
Select font in a requester.
Font->Topaz 8/9
~~~~~~~~~~~~~~~
The fonts that lives in the kickstart.
Scroll Bar->None
~~~~~~~~~~~~~~~~
Don't use a scroll bar.
Scroll Bar->Left/Right/Top/Bottom
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have a scroll bar in the prefered location. Only one can be
used. Even if it is placed at the top or bottom of the
window, it is used for moving the text in the vertical
directions only.
Priority->Inherit
~~~~~~~~~~~~~~~~~
Run at whatever priority TextView was started with.
Priority->Select
~~~~~~~~~~~~~~~~
Enter new priority in a requester.
Priority->-1/0/1
~~~~~~~~~~~~~~~~
Use priority -1, 0 or 1.
Reset To Defaults
~~~~~~~~~~~~~~~~~
Use the same settings as when there is no preference file
for TextView.
Last Saved
~~~~~~~~~~
Loads TextView's configuration file. It is first searched
for in ENV:, and then S:.
Save Settings
~~~~~~~~~~~~~
Saves a configuration file named "TextView.prefs", which is
a couple of hundred bytes long. TextView first tries to
save it in ENVARC:, which is usually assigned to
SYS:Prefs/Env-Archive under AmigaOS 2.0+. If there was any
error, TextView quietly tries to save it in S: instead.
Then it is saved once more in ENV:. If there was any error
along the way, the screen will flash.
10. Comments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you bring up the menus while TextView is scrolling text,
the menus and some text can get garbled.
Showing italic text under kickstart 1.2/1.3 can crash the
machine.
Window borders and the scrollbar can get overwritten when
showing different fontstyles, especially with large fonts.
All ANSI codes are not interpreted correctly. Colors and
styles are reset at the beginning of each line.
11. History
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.0 (31.10.94)
· First release.
1.1 (8.11.94)
· Can load encrypted files crunched with PowerPacker.
· Uses ENV:/ENVARC: rather than S: for configuration file.
· Scroll page one char left or right is faster.
· Save settings didn't save priority value.
· Changing size of window when about or help text was shown
didn't calculate new size of page.
1.2 (29.7.95)
· Removed option to use asl.library for file-, font- and
screen mode requesters.
· Removed option to print file.
· Menus under KS 1.3 looks exactly the same as under 2.0.
· Optimized search routine, small but significant change.
· Loading routine crashed on some errors. :-(
· Does not use Seek() with offset argument OFFSET_END.
Loading crunched files would give Seek() error on A570.
· Choosing scrollbar none wouldn't always make it disappear.
· Italicised text didn't look nice when scrolling one char
left or right.
· Handles filename with spaces when started as default tool
from Workbench.
· Integrated menu Project->About and Help key functions.
This function now also shows file location in memory,
available memory and some other info. Also fixed bug which
let the text be shown in any font style.
· Quits with a return code of 20 (RETURN_FAIL) in case of an
error or if Ctrl-D is received.
· Listens to Ctrl-C, Ctrl-D and Ctrl-F. When Ctrl-C is
received TextView will quit. When Ctrl-D is received
TextView will quit with a return code of 20 (RETURN_FAIL).
When Ctrl-F is received TextView will bring its window to
the front and activate it.
· Line length limit extended from 1024 to 65535 chars.
· Can crunch (but not encrypt) file and save it crunched.
(requires powerpacker.library).
· Alt with arrow key moves 1/5th of page.
· Save As and Save PP use separate requester buffer.
· Successful saving adds file in requester buffer.
· Changing ANSI flag wouldn't always refresh page correctly.
· Hilites string searched for with pen color 3 if second
bitplane already is in use.
· Added Guide flag in Settings menu.
· TextView is now shareware.
1.3 (3.2.96)
· Loading routine uses dos.library/OpenFromLock() instead of
dos.library/Open() when possible. (KS 2.0+)
· Emulation of LockPubScreen() (used on KS 1.3) now opens a
small window on the workbench screen. Method used before
was not good.
· Opening window on public screen brings screen to front
and then opens window, not the other way around.
(I like to see what's happening. :)
· Opening window on public screen will bring back eventual
screen that was in front before.
· Removed bugs in the code that scans the public screen list
(when selecting Settings->Screen->Use Public Screen).
· Saving settings saves name of public screen, so TextView
won't always necessarily open on default public screen.
· Remembers window position and size better.
· Resizes window before opening on a screen that is too
small little more clever (when cycling through public
screens for example).
· Bug fix: Illegal FreeMem() when window/screen failed to
open.
· Opens interleaved screen. (KS 3.0+)
· Opens window on public screen with Type=PUBLICSCREEN
instead of CUSTOMSCREEN. (KS 2.0+)
· Checks visitor windows before changing settings that will
close and reopen screen.
· Menu items that has no effect at the moment are ghosted.
· Uses a copy of the window rastport. Using window on
Workbench screen on KS 1.3 and changing the rastport mask
didn't look good when doing window arrangement. (TextView
will still always set font used for text output in window
rastport to cooperate with Snap and PowerSnap.)
· Made text output faster when using any 8x8 size font,
though this uses some memory.
· Implemented smooth, pixel resolution, realtime scrolling
using the scrollbar. TextView now uses the same technique
as req.library and CygnusEd.
· Knows about more error codes returned by OpenScreen(), and
retries a little harder when it fails.
· Scrollbar can be placed at the top or the bottom of the
window.
· Made a scrolling routine that uses the CPU, if it is 68020
or better.
· Never shows carriage return, so you don't have to select
Settings->ANSI if you only want them out of the way.
· Changed MEMF_PUBLIC/MEMF_ANY attributes on some memory
allocations to work better (faster) with virtual memory.
· Right mouse button is no longer used for scrolling, only
the left one.
· Added ability to directly choose hires and interlace
screenmodes.
· Added menu item Settings->Colors->Random.
· Changes priority to -1 when crunching.
· Put back option to use asl.library for file-, font- and
screen mode requesters.
· Non-printable characters are shown as '.' in bin/hex mode.
· Calls AutoRequest() on common errors instead of
DisplayAlert().
· Found math routines in KS 1.3, now uses them.
· Added close gadget on screen.
· Screen text font is same as default public screen, not
system default font.
· ANSI flag handles backspace, except when the beginning of
the lines aren't shown.
· New menu: Search.
· Searching for previous occurence of a string could fail,
if the string was near the very beginning of the text.
· Can decrunch non-encrypted files without powerpacker.lib.
· Added option "Use Custom Routines". Before they were used
when "Make Screen Public" was deselected.
· Word Wrap implemented.
· Lots of minor changes and bug fixes.
1.4 (8.2.96)
· Loading new file while in bin/hex mode will no longer
reset to normal mode.
· Parses commandline with ReadArgs() instead of own routine.
(KS 2.0+)
· Added bin/hex commandline options.
· Bug fix: Using an asl-requester and a reqtools-requester
would corrupt memory list when quitting.
· Handles string in an AmigaGuide command that ends with "'"
better.
· Improved rand-routine.
· Preset palettes had no values for color registers 4-7.
12. Credits
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks to:
· Nico François for reqtools.library and
powerpacker.library.
· Andreas Magnusson for betatesting.
· All who sent me bugreports and suggestions.
13. Distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TextView is made by and copyright Torbjörn Andersson. No
commercial usage is allowed without written permission from
the author. Other distribution is allowed if no files in
the original distribution are removed or modified.
TextView is not free. If you use it for more than one month
you are requested to register. The suggested fee is US $5 or
20 SEK. Please send the fee to this address:
Torbjörn Andersson
Knöppletorp 4379
S-380 31 LÄCKEBY
SWEDEN
Please write to me if you can use email and have any
comments or questions. My email address is:
d95ta@efd.lth.se
I love you - AMIGA